//动态导入json数据
	
var xmlRequest = createXHQ();

xmlRequest.open("GET","../json/purchaseZT.json");
xmlRequest.send();

xmlRequest.onreadystatechange=function(){
	
	if(xmlRequest.readyState===4){
		if(xmlRequest.status===200){
			var result1 = xmlRequest.responseText;
			var resultObject = JSON.parse(result1);	
			
			var userLogin = document.getElementById("user");
			if(resultObject.userName!=null&&resultObject.userName!=""){
				userLogin.innerHTML=resultObject.userName;
				userLogin.href="../user_more.html";
			}
			
			var f_div = document.getElementById("main");
			
			var ps1 = "";
			for(var i=0;i<resultObject.orderForm.orderItem.length;i++){
				ps1 += "<p>"+
							"<span class='s-t1'>"+
								"<a href='#'>"+ resultObject.orderForm.orderItem[i].shopTitle +"</a>"+
							"</span>"+
							"<span class='s-t2'>"+
								"数量："+ resultObject.orderForm.orderItem[i].shopNum +
							"</span>"+
						"</p>";
			}
				
			var z_main=	"<p class='m-tz'><strong>我的商城</strong>&nbsp;>&nbsp;下单状态</p>"+
						"<div>"+
							"<span class='dingdanID'>"+
								"<strong>订单号：</strong>"+
								+ resultObject.orderForm.orderId +
							"</span>"+
							"<span class='dingdanZT'>"+
								"<strong>状态：</strong>"+
								"<strong class='zt'>"+ resultObject.orderForm.orderId +"</strong>"+
							"</span>"+
							"<div class='btn-dingdan'>"+
									"<input type='button' class='s-btn1' value='订单详情' />"+
									"<input type='button' class='s-btn2' value='删除订单' />"+
							"</div>"+	
							"<div style='height: 2px; width: 1500px; background-color: #999999; margin-top: 15px;'></div>"+
							"<div class='shopping'>"+
								"<div class='li-shopping'>"+
									ps1+
								"</div>"+
								
							"</div>"+
						"</div>";
				
			f_div.innerHTML=z_main;
		}else{
			alert("错误信息："+xmlRequest.status);
		}
	}
}